﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;

namespace MyMusicPlay._4._0.ElementFactory
{
    public class TextBlockFactory : ElementFactoryBase
    {
        public TextBlockFactory(MainWindow main) : base(main)
        { }

        protected override Element CreateElement<Element>(Action<Element> action = null)
        {
            var element = base.CreateElement(action) as TextBlock;
            var disTextColor = PlayApplication.GetModule<DispositionApp>().ReadDispositionOfTextColor();
            element!.Foreground = SY_Library.Color.BackColor(disTextColor.R, disTextColor.G, disTextColor.B);
            return (element as Element)!;
        }
    }
}
